-- card: 57613 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 4755 -- name: -- part contents for background part 4 ----- text ----- FILE I/O To read from and write to files, the appropriate stream should first be opened via the standard library function fopen(), whose prototype is: FILE *fopen(char *filename, char *description); The filename and description arguments specify the name of the file and how it will be used, such as "r" for reading a text stream and "w" for writing to a text stream. The return value is a pointer to a FILE type: a data structure defined in stdio.h identifying the characteristics of the I/O device specified. The fprintf() and fscanf() functions are very similar to printf() and scanf() except that their first argument is a FILE pointer: int fprintf(FILE *stream, char *format_string, ...); int fscanf(FILE *stream, char *format_string, ...); -- part contents for background part 7 ----- text ----- 191